<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD>
<TITLE> New Document </TITLE>
<META NAME="Generator" CONTENT="EditPlus">
<META NAME="Author" CONTENT="">
<META NAME="Keywords" CONTENT="">
<META NAME="Description" CONTENT="">
<style>
body{cursor:default;margin:10;border:1px solid #000000;}
input{font-size:10px;font-family:Verdana;border:1px solid #000000;}
td{font-size:10px;font-family:Verdana}
select{font-size:10px;font-family:Verdana}
.button{background-color:transparent;}
</style>
<script>
	var parentObject		= null;
	var _jEditor			= null;
	var allowKill			= true;

	document.onselectstart	= function(){return false;}
	window.onfocus			= resize;
	


	function addanchor()
	{	
		_jEditor.insertHTML('<a name='+anchor.value+'>','</a>',false);
		kill();
	}

	function kill()
	{
		if(parentObject!=null && parentObject.parentElement)
		{
			parentObject.parentElement.activeState	= false;
			parentObject.parentElement.buttonState	= 'out';
			parentObject.style.visibility			= 'hidden';
		}
	}

	function resize()
	{	

		parentObject.style.width	= document.body.scrollWidth+1;
		parentObject.style.height	= document.body.scrollHeight+1;

		var curSel					= _jEditor.editControl.DOM.selection;
		var curRng					= curSel.createRange();
		var curTag					= _jEditor.offsetToNode();
		if(curTag.tagName=='A' && curTag.getAttribute('name')!=null && curTag.getAttribute('href')==null)
		{
			anchor.value				= curTag.getAttribute('name');
		}
		else
		{
			anchor.value				= 'anchor';
		}
		anchor.focus();
	}

	function public_init(e)
	{
		parentObject				= e;
		_jEditor					= parent.document.all(e.ancestor);
		self.focus();
	}

</script>
</HEAD>

<BODY>
<TABLE border=0 cellspacing=0 cellpadding=3 id=iTable>
<tr>
<td>Name:</td>
<td><input type=text id=anchor value="anchor" onblur="if(allowKill)kill()"></td>
</tr>
<tr>
<td>&nbsp;</td>
<td><input type=button onclick=addanchor() value=OK class=button onmouseover="allowKill=false" onmouseout="allowKill=true"> <input type=button onclick=kill() value=Cancel class=button onmouseover="allowKill=false" onmouseout="allowKill=true"></td>
</tr>
</TABLE>
</BODY>
</HTML>
